<template>
    <div>
        <div>
            <commpVxeTable
            :key="refreshTable"
            ref="headmanVxeTable"
            :config="config" 
            :columns="columnsVxe" 
            :formItem="formItem"
            :conditionBtnRow="true"
            :isCanWrap="true"
            @checkboxChange="checkboxChange"
            > 
                <!-- <template v-slot:externalOperations="{data}">
                    <vxe-form-item>
                        <template>
                            <a-button type="primary" icon="export" ghost @click="exportClick()">导出</a-button>
                        </template>
                    </vxe-form-item>
                </template> -->
                <template v-slot:realname_default="{row}" data-desc="姓名">
                    <span style="padding-right: 21;" v-if="row.realname.length == 2">
                        <span v-for="(trem,tI) in row.realname.split('')" :key="tI" >
                            {{trem}}
                            <span v-if="tI+1 !== row.realname.split('').length">&nbsp;&nbsp;</span>
                        </span>
                    </span>
                    <span style="padding-right: 21;" v-else>{{ row.realname }}</span>
                </template>
                <template v-slot:sex_default="{row}">
                    <span>{{ row.sex == 1?'男':'女' }}</span>
                </template>
                <template v-slot:operation_btn="{row}" data-desc="自定操作栏">
                    <a-form layout="inline" class="search-form" >
                        <a-form-item >
                            <a-button class="green-btn" type="primary" icon="eye" @click="eyeClick(row)">查看</a-button>
                        </a-form-item>
                    </a-form> 
                </template>
            </commpVxeTable>
            <reimbursementModel ref="reimbursementModelRef" />
        </div>
    </div>
</template>
<script>
import assessCheckApi from './service/api'
import commpVxeTable from '@/components/commp-vxe-table/commp-vxe-table.vue'
import reimbursementModel from './reimbursementModel.vue'
export default {
    components:{
        commpVxeTable,
        reimbursementModel,
    },
    props:{

    },
    data(){
        return{
            formState:{},
            refreshTable:null,
            config:{
                api: assessCheckApi.jcyfybxdqueryFybxdPageList,
                rowId: 'id',
                paramet:{
                }
            },
            columnsVxe:[{ 
                type: 'checkbox', 
                width: 60 ,
                fixed: 'left'
            },{
                title: '审评内容', //列头显示文字
                field: 'fbxnrms',
                
            },{
                title: '审评日期', //列头显示文字
                field: 'fbxsjms',
            },{
                title: '总计金额', //列头显示文字
                field: 'fhjbxje',
            },{
                title: '操作',
                field: 'id',
                slots: {
                    // 使用插槽模板渲染
                    default: 'operation_btn',
                },
                width:95,
                fixed:'right'
            }],
            formItem:[{
                label: '审评内容',
                model: 'fbxnrms',
            }],
            selectIdArr:[],
        }
    },
    watch:{

    },
    mounted(){
    },
    methods:{
        eyeClick(row){
            //console.log(row)
            this.$refs.reimbursementModelRef.getData({...row,sqsxid:row.fsqsxid,view:true,heightType:'model'})
            this.$refs.reimbursementModelRef.visible = true
        },
    }
}
</script>